
<template>
  <a-layout style="min-height: 100vh">
    <a-layout-sider v-model:collapsed="collapsed" collapsible>
      <div class="logo"></div>
      <a-menu v-model:selectedKeys="selectedKeys" theme="dark" mode="inline" :openKeys="sub1">
        <a-menu-item key="1">
          <UserOutlined />
          <router-link to="/creatorCenter/personalData"><span>个人中心</span></router-link>
        </a-menu-item>
        <a-menu-item key="2">
          <SettingOutlined />
          <router-link to="/creatorCenter/accountSetting"><span>账号设置</span></router-link>
        </a-menu-item>
        <a-sub-menu key="sub1" defaultCollapsed="false">
          <template #title>
            <span>
              <BarsOutlined />
              <span>内容管理</span>
            </span>
          </template>
          <a-menu-item key="3">
            <BookOutlined />
            <router-link to="/creatorCenter/articleManage"><span>我的文章</span></router-link>
          </a-menu-item>
          <a-menu-item key="4">
            <CommentOutlined />
            <router-link to="/creatorCenter/commentManage"><span>我的评论</span></router-link>
          </a-menu-item>
        </a-sub-menu>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0" />
        <div style="">
        <a-layout-content
          :style="{ margin: '24px 16px', background: '#fff', }">
          <RouterView/>
        </a-layout-content>
        </div>
    </a-layout>
  </a-layout>
</template>
<script lang="ts" setup>
import { SettingOutlined,UserOutlined,CommentOutlined,BookOutlined,BarsOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
const collapsed = ref<boolean>(false);
const selectedKeys = ref<string[]>(['3']);
const sub1 = ref<string[]>(['sub1']);
</script>
<style scoped>
#components-layout-demo-side .logo {
  height: 32px;
  margin: 16px;
  background: rgba(255, 255, 255, 0.3);
}

.site-layout .site-layout-background {
  background: #fff;
}
[data-theme='dark'] .site-layout .site-layout-background {
  background: #141414;
}
</style>
